const initData = {
    num: 1,
    goodsList:[],
    title:'萱'
}
const calculate = (state=initData,action)=>{
    switch (action.type) {
        case 'GETLIST':
            return {
                ...state,
                num: state.num + action.count,
                goodsList: action.list
            }
        case 'GETTITLE':
            return {
                ...state,
                title: action.title,
            }
        default:
            return state;
    }
}
export {calculate}